package com.uzai.console.entity.es;

import com.uzai.common.utils.EsIndexName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * 营销奖励黑名单
 */
@Document(indexName = EsIndexName.BLACKLIST_MARKETING_REWARDS, shards = 3, replicas = 2)
@Data
public class MarketingRewardsBlackListDocument implements Serializable {

    /**
     * id为wxid
     */
    @ApiModelProperty("主键ID,")
    @Id
    @Field(type = FieldType.Keyword)
    private String id;

    /**
     * 运营商ID(共享着)
     */
    @Field(type = FieldType.Long)
    private Long merId;

    /**
     * 设备唯一Id
     */
    @Field(type = FieldType.Long)
    private Long deviceUniqueId;

    /**
     * 设备类型
     */
    @Field(type = FieldType.Keyword)
    private String deviceType;

    /**
     * 用户wxid
     */
    @Field(type = FieldType.Keyword)
    private String wxid;

    /**
     * 用户昵称
     */
    @Field(type = FieldType.Text)
    private String nickName;

    /**
     * 头像连接
     */
    @Field(type = FieldType.Keyword)
    private String headImg;

    /**
     * 加黑原因
     */
    @Field(type = FieldType.Text)
    private String remark;

    /**
     * 黑名单类型
     */
    @Field(type = FieldType.Integer)
    private Integer type;

    /**
     * 数据来源(0运营商共享 1官方采集-免费  2收费名单)
     */
    @Field(type = FieldType.Integer)
    private Integer source;
    /**
     * 下级不自动通过好友(0 关闭 1开启)
     */
    @Field(type = FieldType.Integer)
    private Integer subNotPassFriend;

    /**
     * 创建时间
     */
    @Field(type = FieldType.Integer)
    private int createTime;

    /**
     * 修改时间
     */
    @Field(type = FieldType.Integer)
    private int updateTime;
}
